home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / TextEdit.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  25.8 KB  |  898 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextEdit.a
  3. ;
  4. ;    Contains:    TextEdit Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  19. __TEXTEDIT__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  28.     include 'MixedMode.a'
  29.     ENDIF
  30.  
  31.  
  32.  
  33. ; typedef TERec *                        TEPtr
  34.  
  35. ; typedef TEPtr *                        TEHandle
  36.  
  37. ;  
  38. ;    Important note about TEClickLoopProcPtr and WordBreakProcPtr
  39. ;
  40. ;    At one point these were defined as returning the function result in the 
  41. ;    condition code Z-bit.  This was correct, in that it was what the 68K
  42. ;    implementation of TextEdit actually tested.  But, MixedMode had a different 
  43. ;    idea of what returning a boolean in the Z-bit meant.  MixedMode was setting
  44. ;    the Z-bit the complement of what was wanted.  
  45. ;    
  46. ;    Therefore, these ProcPtrs have been changed (back) to return the result in
  47. ;    register D0.  It turns out that for register based routines, 
  48. ;    MixedMode sets the Z-bit of the 68K emulator based on the contents 
  49. ;    of the return result register.  Thus we can get the Z-bit set correctly.  
  50. ;    
  51. ;    But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
  52. ;    or WordBreak routine, register D0 had better have the result (in addition
  53. ;    to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
  54. ;    WordBreak routines set register D0 at the end.
  55. ;
  56.  
  57.  
  58. ;  
  59. ;    There is no function to get/set the low-mem for FindWordHook at 0x07F8.
  60. ;    This is because it is not a low-mem ProcPtr. That address is the entry
  61. ;    in the OS TrapTable for trap 0xA0FE.  You can use Get/SetTrapAddress to 
  62. ;    acccess it.    
  63. ;
  64.  
  65.  
  66. ;    The following ProcPtrs cannot be written in or called from a high-level 
  67. ;    language without the help of mixed mode or assembly glue because they 
  68. ;    use the following parameter-passing conventions:
  69. ;
  70. ;    typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
  71. ;    typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
  72. ;
  73. ;        In:
  74. ;            =>     r                        on stack
  75. ;            =>    pTE                        A3.L
  76. ;        Out:
  77. ;            none
  78. ;
  79. ;    typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
  80. ;
  81. ;        In:
  82. ;            =>     theChar                    D0.B
  83. ;            =>    pTE                        A3.L
  84. ;            =>    hTE                        A4.L
  85. ;        Out:
  86. ;            <=    Boolean                    Z bit of the CCR
  87. ;
  88. ;    typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
  89. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  90. ;    typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
  91. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  92. ;
  93. ;        In:
  94. ;            =>     textLen                    D0.W
  95. ;            =>    textOffset                D1.W
  96. ;            =>    textBufferPtr            A0.L
  97. ;            =>    pTE                        A3.L
  98. ;            =>    hTE                        A4.L
  99. ;        Out:
  100. ;            <=    unsigned short            D1.W
  101. ;
  102. ;    typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
  103. ;     unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr, 
  104. ;     short *lineStart, TEPtr pTE, TEHandle hTE);
  105. ;
  106. ;        In:
  107. ;            =>     styleRunLen                D0.W
  108. ;            =>    styleRunOffset            D1.W
  109. ;            =>    slop                    D2.W (low)
  110. ;            =>    direction                D2.W (high)
  111. ;            =>    textBufferPtr            A0.L
  112. ;            =>    lineStart                A2.L
  113. ;            =>    pTE                        A3.L
  114. ;            =>    hTE                        A4.L
  115. ;        Out:
  116. ;            <=    unsigned short            D1.W
  117. ;
  118. ;    typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
  119. ;     void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  120. ;
  121. ;        In:
  122. ;            =>     textOffset                D0.W
  123. ;            =>    drawLen                    D1.W
  124. ;            =>    textBufferPtr            A0.L
  125. ;            =>    pTE                        A3.L
  126. ;            =>    hTE                        A4.L
  127. ;        Out:
  128. ;            none
  129. ;
  130. ;    typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
  131. ;     unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
  132. ;     TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset, 
  133. ;     Boolean *pixelInChar);
  134. ;
  135. ;        In:
  136. ;            =>     styleRunLen                D0.W
  137. ;            =>    styleRunOffset            D1.W
  138. ;            =>    slop                    D2.W
  139. ;            =>    textBufferPtr            A0.L
  140. ;            =>    pTE                        A3.L
  141. ;            =>    hTE                        A4.L
  142. ;        Out:
  143. ;            <=    pixelWidth                D0.W (low)
  144. ;            <=    Boolean                    D0.W (high)
  145. ;            <=    charOffset                D1.W
  146. ;            <=    pixelInChar                D2.W
  147. ;
  148. ;    typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller, 
  149. ;     TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
  150. ;
  151. ;        In:
  152. ;            =>     currentPos                D0.W
  153. ;            =>    caller                    D2.W
  154. ;            =>    pTE                        A3.L
  155. ;            =>    hTE                        A4.L
  156. ;        Out:
  157. ;            <=    wordStart                D0.W
  158. ;            <=    wordEnd                    D1.W
  159. ;
  160. ;    typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
  161. ;       unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
  162. ;
  163. ;        In:
  164. ;            =>     pTE                        A3.L
  165. ;            =>    changeLength            D7.W
  166. ;        Out:
  167. ;            <=    lineStart                D2.W
  168. ;            <=    firstChar                D3.W
  169. ;            <=    lastChar                D4.W
  170. ;
  171. ;    typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
  172. ;                         short selector, GrafPtr *currentGrafPort, short *charPosition);
  173. ;
  174. ;        In:
  175. ;            =>     pTE                        A3.L
  176. ;            =>    firstChar                D3.W
  177. ;            =>    lastChar                D4.W
  178. ;            =>    selector                D7.W
  179. ;        Out:
  180. ;            <=    currentGrafPort            A0.L
  181. ;            <=    charPosition            D0.W
  182. ;            
  183. ;
  184.  
  185. TERec                    RECORD 0
  186. destRect                 ds        Rect            ; offset: $0 (0)
  187. viewRect                 ds        Rect            ; offset: $8 (8)
  188. selRect                     ds        Rect            ; offset: $10 (16)
  189. lineHeight                 ds.w    1                ; offset: $18 (24)
  190. fontAscent                 ds.w    1                ; offset: $1A (26)
  191. selPoint                 ds        Point            ; offset: $1C (28)
  192. selStart                 ds.w    1                ; offset: $20 (32)
  193. selEnd                     ds.w    1                ; offset: $22 (34)
  194. active                     ds.w    1                ; offset: $24 (36)
  195. wordBreak                 ds.l    1                ; offset: $26 (38)
  196. clickLoop                 ds.l    1                ; offset: $2A (42)
  197. clickTime                 ds.l    1                ; offset: $2E (46)
  198. clickLoc                 ds.w    1                ; offset: $32 (50)
  199. caretTime                 ds.l    1                ; offset: $34 (52)
  200. caretState                 ds.w    1                ; offset: $38 (56)
  201. just                     ds.w    1                ; offset: $3A (58)
  202. teLength                 ds.w    1                ; offset: $3C (60)
  203. hText                     ds.l    1                ; offset: $3E (62)
  204. hDispatchRec             ds.l    1                ; offset: $42 (66)        ;  added to replace recalBack & recalLines.  it's a handle anyway 
  205. clikStuff                 ds.w    1                ; offset: $46 (70)
  206. crOnly                     ds.w    1                ; offset: $48 (72)
  207. txFont                     ds.w    1                ; offset: $4A (74)
  208. txFace                     ds.w    1                ; offset: $4C (76)        ; txFace is unpacked byte
  209. txMode                     ds.w    1                ; offset: $4E (78)
  210. txSize                     ds.w    1                ; offset: $50 (80)
  211. inPort                     ds.l    1                ; offset: $52 (82)
  212. highHook                 ds.l    1                ; offset: $56 (86)
  213. caretHook                 ds.l    1                ; offset: $5A (90)
  214. nLines                     ds.w    1                ; offset: $5E (94)
  215. lineStarts                 ds.w    16001            ; offset: $60 (96)
  216. sizeof                     EQU *                    ; size:   $7D62 (32098)
  217.                         ENDR
  218.  
  219.                                                             ; Justification (word alignment) styles 
  220. teJustLeft                        EQU        0
  221. teJustCenter                    EQU        1
  222. teJustRight                        EQU        -1
  223. teForceLeft                        EQU        -2                    ; new names for the Justification (word alignment) styles 
  224. teFlushDefault                    EQU        0                    ;flush according to the line direction 
  225. teCenter                        EQU        1                    ;center justify (word alignment) 
  226. teFlushRight                    EQU        -1                    ;flush right for all scripts 
  227. teFlushLeft                        EQU        -2                    ;flush left for all scripts 
  228.  
  229.                                                             ; Set/Replace style modes 
  230. fontBit                            EQU        0                    ;set font
  231. faceBit                            EQU        1                    ;set face
  232. sizeBit                            EQU        2                    ;set size
  233. clrBit                            EQU        3                    ;set color
  234. addSizeBit                        EQU        4                    ;add size mode
  235. toggleBit                        EQU        5                    ;set faces in toggle mode
  236.  
  237.                                                             ; TESetStyle/TEContinuousStyle modes 
  238. doFont                            EQU        1                    ; set font (family) number
  239. doFace                            EQU        2                    ;set character style
  240. doSize                            EQU        4                    ;set type size
  241. doColor                            EQU        8                    ;set color
  242. doAll                            EQU        15                    ;set all attributes
  243. addSize                            EQU        16                    ;adjust type size
  244. doToggle                        EQU        32                    ;toggle mode for TESetStyle
  245.  
  246.                                                             ; offsets into TEDispatchRec 
  247. EOLHook                            EQU        0                    ;[UniversalProcPtr] TEEOLHook
  248. DRAWHook                        EQU        4                    ;[UniversalProcPtr] TEWidthHook
  249. WIDTHHook                        EQU        8                    ;[UniversalProcPtr] TEDrawHook
  250. HITTESTHook                        EQU        12                    ;[UniversalProcPtr] TEHitTestHook
  251. nWIDTHHook                        EQU        24                    ;[UniversalProcPtr] nTEWidthHook
  252. TextWidthHook                    EQU        28                    ;[UniversalProcPtr] TETextWidthHook
  253.  
  254.                                                             ; selectors for TECustomHook 
  255. intEOLHook                        EQU        0                    ;TEIntHook value
  256. intDrawHook                        EQU        1                    ;TEIntHook value
  257. intWidthHook                    EQU        2                    ;TEIntHook value
  258. intHitTestHook                    EQU        3                    ;TEIntHook value
  259. intNWidthHook                    EQU        6                    ;TEIntHook value for new version of WidthHook
  260. intTextWidthHook                EQU        7                    ;TEIntHook value for new TextWidthHook
  261. intInlineInputTSMTEPreUpdateHook EQU    8                    ;TEIntHook value for TSMTEPreUpdateProcPtr callback
  262. intInlineInputTSMTEPostUpdateHook EQU    9                    ;TEIntHook value for TSMTEPostUpdateProcPtr callback
  263.  
  264.                                                             ; feature or bit definitions for TEFeatureFlag 
  265. teFAutoScroll                    EQU        0                    ;00000001b
  266. teFTextBuffering                EQU        1                    ;00000010b
  267. teFOutlineHilite                EQU        2                    ;00000100b
  268. teFInlineInput                    EQU        3                    ;00001000b 
  269.                                                             ;    teFUseTextServices is obsolete. 
  270. teFUseInlineInput                EQU        5                    ;00100000b 
  271. teFInlineInputAutoScroll        EQU        6                    ;01000000b 
  272.  
  273.  
  274.                                                             ; action for the new "bit (un)set" interface, TEFeatureFlag 
  275. teBitClear                        EQU        0
  276. teBitSet                        EQU        1                    ;set the selector bit
  277. teBitTest                        EQU        -1                    ;no change; just return the current setting
  278.  
  279.                                                             ;constants for identifying the routine that called FindWord 
  280. teWordSelect                    EQU        4                    ;clickExpand to select word
  281. teWordDrag                        EQU        8                    ;clickExpand to drag new word
  282. teFromFind                        EQU        12                    ;FindLine called it ($0C)
  283. teFromRecal                        EQU        16                    ;RecalLines called it ($10)      obsolete 
  284.  
  285.                                                             ;constants for identifying TEDoText selectors 
  286. teFind                            EQU        0                    ;TEDoText called for searching
  287. teHighlight                        EQU        1                    ;TEDoText called for highlighting
  288. teDraw                            EQU        -1                    ;TEDoText called for drawing text
  289. teCaret                            EQU        -2                    ;TEDoText called for drawing the caret
  290.  
  291.  
  292. Chars                    RECORD 0
  293. elements                 ds.b    32001
  294.                          ORG 32002
  295. sizeof                     EQU *                    ; size:   $7D02 (32002)
  296.                         ENDR
  297.  
  298.  
  299. ; typedef CharsPtr *                    CharsHandle
  300.  
  301. StyleRun                RECORD 0
  302. startChar                 ds.w    1                ; offset: $0 (0)        ; starting character position
  303. styleIndex                 ds.w    1                ; offset: $2 (2)        ; index in style table
  304. sizeof                     EQU *                    ; size:   $4 (4)
  305.                         ENDR
  306. STElement                RECORD 0
  307. stCount                     ds.w    1                ; offset: $0 (0)        ; number of runs in this style
  308. stHeight                 ds.w    1                ; offset: $2 (2)        ; line height
  309. stAscent                 ds.w    1                ; offset: $4 (4)        ; font ascent
  310. stFont                     ds.w    1                ; offset: $6 (6)        ; font (family) number
  311. stFace                     ds.w    1                ; offset: $8 (8)        ; character Style
  312. stSize                     ds.w    1                ; offset: $A (10)        ; size in points
  313. stColor                     ds        RGBColor        ; offset: $C (12)        ; absolute (RGB) color
  314. sizeof                     EQU *                    ; size:   $12 (18)
  315.                         ENDR
  316. TEStyleTable            RECORD 0
  317. elements                 ds.b    1777 * STElement.sizeof
  318. sizeof                     EQU *                    ; size:   $7CF2 (31986)
  319.                         ENDR
  320.  
  321.  
  322. ; typedef STPtr *                        STHandle
  323.  
  324. LHElement                RECORD 0
  325. lhHeight                 ds.w    1                ; offset: $0 (0)        ; maximum height in line
  326. lhAscent                 ds.w    1                ; offset: $2 (2)        ; maximum ascent in line
  327. sizeof                     EQU *                    ; size:   $4 (4)
  328.                         ENDR
  329. LHTable                    RECORD 0
  330. elements                 ds.b    8001 * LHElement.sizeof
  331. sizeof                     EQU *                    ; size:   $7D04 (32004)
  332.                         ENDR
  333.  
  334.  
  335. ; typedef LHPtr *                        LHHandle
  336.  
  337. ScrpSTElement            RECORD 0
  338. scrpStartChar             ds.l    1                ; offset: $0 (0)        ; starting character position
  339. scrpHeight                 ds.w    1                ; offset: $4 (4)
  340. scrpAscent                 ds.w    1                ; offset: $6 (6)
  341. scrpFont                 ds.w    1                ; offset: $8 (8)
  342. scrpFace                 ds.w    1                ; offset: $A (10)        ; unpacked byte
  343. scrpSize                 ds.w    1                ; offset: $C (12)
  344. scrpColor                 ds        RGBColor        ; offset: $E (14)
  345. sizeof                     EQU *                    ; size:   $14 (20)
  346.                         ENDR
  347. ;  ARRAY [0..1600] OF ScrpSTElement 
  348. ScrpSTTable                RECORD 0
  349. elements                 ds.b    1601 * ScrpSTElement.sizeof
  350. sizeof                     EQU *                    ; size:   $7D14 (32020)
  351.                         ENDR
  352.  
  353.  
  354. StScrpRec                RECORD 0
  355. scrpNStyles                 ds.w    1                ; offset: $0 (0)        ; number of styles in scrap
  356. scrpStyleTab             ds        ScrpSTTable        ; offset: $2 (2)        ; table of styles for scrap
  357. sizeof                     EQU *                    ; size:   $7D16 (32022)
  358.                         ENDR
  359. ; typedef struct StScrpRec *            StScrpPtr
  360.  
  361. ; typedef StScrpPtr *                    StScrpHandle
  362.  
  363. NullStRec                RECORD 0
  364. teReserved                 ds.l    1                ; offset: $0 (0)        ; reserved for future expansion
  365. nullScrap                 ds.l    1                ; offset: $4 (4)        ; handle to scrap style table
  366. sizeof                     EQU *                    ; size:   $8 (8)
  367.                         ENDR
  368. ; typedef struct NullStRec *            NullStPtr
  369.  
  370. ; typedef NullStPtr *                    NullStHandle
  371.  
  372. TEStyleRec                RECORD 0
  373. nRuns                     ds.w    1                ; offset: $0 (0)        ; number of style runs
  374. nStyles                     ds.w    1                ; offset: $2 (2)        ; size of style table
  375. styleTab                 ds.l    1                ; offset: $4 (4)        ; handle to style table
  376. lhTab                     ds.l    1                ; offset: $8 (8)        ; handle to line-height table
  377. teRefCon                 ds.l    1                ; offset: $C (12)        ; reserved for application use
  378. nullStyle                 ds.l    1                ; offset: $10 (16)        ; Handle to style set at null selection
  379. runs                     ds.b    8001 * StyleRun.sizeof ; offset: $14 (20) ; ARRAY [0..8000] OF StyleRun
  380. sizeof                     EQU *                    ; size:   $7D18 (32024)
  381.                         ENDR
  382. ; typedef struct TEStyleRec *            TEStylePtr
  383.  
  384. ; typedef TEStylePtr *                    TEStyleHandle
  385.  
  386. TextStyle                RECORD 0
  387. tsFont                     ds.w    1                ; offset: $0 (0)        ; font (family) number
  388. tsFace                     ds.w    1                ; offset: $2 (2)        ; character Style
  389. tsSize                     ds.w    1                ; offset: $4 (4)        ; size in point
  390. tsColor                     ds        RGBColor        ; offset: $6 (6)        ; absolute (RGB) color
  391. sizeof                     EQU *                    ; size:   $C (12)
  392.                         ENDR
  393. ; typedef struct TextStyle *            TextStylePtr
  394.  
  395. ; typedef TextStylePtr *                TextStyleHandle
  396.  
  397. ; typedef short                         TEIntHook
  398.  
  399.  
  400.                                                             ; feature bit 4 for TEFeatureFlag no longer in use 
  401. teFUseTextServices                EQU        4                    ;00010000b 
  402.  
  403. ;
  404. ; pascal Handle TEScrapHandle(void)
  405. ;
  406.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  407.         Macro
  408.         _TEScrapHandle        &dest=(sp)
  409.             move.l            $0AB4,&dest
  410.         EndM
  411.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  412.         IMPORT_CFM_FUNCTION TEScrapHandle
  413.     ENDIF
  414.  
  415. ;
  416. ; pascal void TEInit(void )
  417. ;
  418.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  419.         _TEInit:    OPWORD    $A9CC
  420.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  421.         IMPORT_CFM_FUNCTION TEInit
  422.     ENDIF
  423.  
  424. ;
  425. ; pascal TEHandle TENew(const Rect *destRect, const Rect *viewRect)
  426. ;
  427.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  428.         _TENew:    OPWORD    $A9D2
  429.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  430.         IMPORT_CFM_FUNCTION TENew
  431.     ENDIF
  432.  
  433. ;
  434. ; pascal void TEDispose(TEHandle hTE)
  435. ;
  436.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  437.         _TEDispose:    OPWORD    $A9CD
  438.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  439.         IMPORT_CFM_FUNCTION TEDispose
  440.     ENDIF
  441.  
  442. ;
  443. ; pascal void TESetText(const void *text, long length, TEHandle hTE)
  444. ;
  445.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  446.         _TESetText:    OPWORD    $A9CF
  447.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  448.         IMPORT_CFM_FUNCTION TESetText
  449.     ENDIF
  450.  
  451. ;
  452. ; pascal CharsHandle TEGetText(TEHandle hTE)
  453. ;
  454.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  455.         _TEGetText:    OPWORD    $A9CB
  456.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  457.         IMPORT_CFM_FUNCTION TEGetText
  458.     ENDIF
  459.  
  460. ;
  461. ; pascal void TEIdle(TEHandle hTE)
  462. ;
  463.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  464.         _TEIdle:    OPWORD    $A9DA
  465.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  466.         IMPORT_CFM_FUNCTION TEIdle
  467.     ENDIF
  468.  
  469. ;
  470. ; pascal void TESetSelect(long selStart, long selEnd, TEHandle hTE)
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  473.         _TESetSelect:    OPWORD    $A9D1
  474.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  475.         IMPORT_CFM_FUNCTION TESetSelect
  476.     ENDIF
  477.  
  478. ;
  479. ; pascal void TEActivate(TEHandle hTE)
  480. ;
  481.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  482.         _TEActivate:    OPWORD    $A9D8
  483.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  484.         IMPORT_CFM_FUNCTION TEActivate
  485.     ENDIF
  486.  
  487. ;
  488. ; pascal void TEDeactivate(TEHandle hTE)
  489. ;
  490.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  491.         _TEDeactivate:    OPWORD    $A9D9
  492.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION TEDeactivate
  494.     ENDIF
  495.  
  496. ;
  497. ; pascal void TEKey(CharParameter key, TEHandle hTE)
  498. ;
  499.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  500.         _TEKey:    OPWORD    $A9DC
  501.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  502.         IMPORT_CFM_FUNCTION TEKey
  503.     ENDIF
  504.  
  505. ;
  506. ; pascal void TECut(TEHandle hTE)
  507. ;
  508.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  509.         _TECut:    OPWORD    $A9D6
  510.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  511.         IMPORT_CFM_FUNCTION TECut
  512.     ENDIF
  513.  
  514. ;
  515. ; pascal void TECopy(TEHandle hTE)
  516. ;
  517.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  518.         _TECopy:    OPWORD    $A9D5
  519.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  520.         IMPORT_CFM_FUNCTION TECopy
  521.     ENDIF
  522.  
  523. ;
  524. ; pascal void TEPaste(TEHandle hTE)
  525. ;
  526.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  527.         _TEPaste:    OPWORD    $A9DB
  528.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  529.         IMPORT_CFM_FUNCTION TEPaste
  530.     ENDIF
  531.  
  532. ;
  533. ; pascal void TEDelete(TEHandle hTE)
  534. ;
  535.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  536.         _TEDelete:    OPWORD    $A9D7
  537.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  538.         IMPORT_CFM_FUNCTION TEDelete
  539.     ENDIF
  540.  
  541. ;
  542. ; pascal void TEInsert(const void *text, long length, TEHandle hTE)
  543. ;
  544.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  545.         _TEInsert:    OPWORD    $A9DE
  546.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  547.         IMPORT_CFM_FUNCTION TEInsert
  548.     ENDIF
  549.  
  550. ;
  551. ; pascal void TESetAlignment(short just, TEHandle hTE)
  552. ;
  553.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  554.         _TESetAlignment:    OPWORD    $A9DF
  555.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  556.         IMPORT_CFM_FUNCTION TESetAlignment
  557.     ENDIF
  558.  
  559. ;
  560. ; pascal void TEUpdate(const Rect *rUpdate, TEHandle hTE)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  563.         _TEUpdate:    OPWORD    $A9D3
  564.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  565.         IMPORT_CFM_FUNCTION TEUpdate
  566.     ENDIF
  567.  
  568. ;
  569. ; pascal void TETextBox(const void *text, long length, const Rect *box, short just)
  570. ;
  571.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  572.         _TETextBox:    OPWORD    $A9CE
  573.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  574.         IMPORT_CFM_FUNCTION TETextBox
  575.     ENDIF
  576.  
  577. ;
  578. ; pascal void TEScroll(short dh, short dv, TEHandle hTE)
  579. ;
  580.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  581.         _TEScroll:    OPWORD    $A9DD
  582.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  583.         IMPORT_CFM_FUNCTION TEScroll
  584.     ENDIF
  585.  
  586. ;
  587. ; pascal void TESelView(TEHandle hTE)
  588. ;
  589.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  590.         _TESelView:    OPWORD    $A811
  591.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  592.         IMPORT_CFM_FUNCTION TESelView
  593.     ENDIF
  594.  
  595. ;
  596. ; pascal void TEPinScroll(short dh, short dv, TEHandle hTE)
  597. ;
  598.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  599.         _TEPinScroll:    OPWORD    $A812
  600.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  601.         IMPORT_CFM_FUNCTION TEPinScroll
  602.     ENDIF
  603.  
  604. ;
  605. ; pascal void TEAutoView(Boolean fAuto, TEHandle hTE)
  606. ;
  607.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  608.         _TEAutoView:    OPWORD    $A813
  609.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  610.         IMPORT_CFM_FUNCTION TEAutoView
  611.     ENDIF
  612.  
  613. ;
  614. ; pascal void TECalText(TEHandle hTE)
  615. ;
  616.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  617.         _TECalText:    OPWORD    $A9D0
  618.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  619.         IMPORT_CFM_FUNCTION TECalText
  620.     ENDIF
  621.  
  622. ;
  623. ; pascal short TEGetOffset(Point pt, TEHandle hTE)
  624. ;
  625.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  626.         _TEGetOffset:    OPWORD    $A83C
  627.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  628.         IMPORT_CFM_FUNCTION TEGetOffset
  629.     ENDIF
  630.  
  631. ;
  632. ; pascal Point TEGetPoint(short offset, TEHandle hTE)
  633. ;
  634.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  635.         Macro
  636.         _TEGetPoint
  637.             move.w              #$0008,-(sp)
  638.             dc.w                $A83D
  639.         EndM
  640.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  641.         IMPORT_CFM_FUNCTION TEGetPoint
  642.     ENDIF
  643.  
  644. ;
  645. ; pascal void TEClick(Point pt, Boolean fExtend, TEHandle h)
  646. ;
  647.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  648.         _TEClick:    OPWORD    $A9D4
  649.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  650.         IMPORT_CFM_FUNCTION TEClick
  651.     ENDIF
  652.  
  653. ;
  654. ; pascal TEHandle TEStyleNew(const Rect *destRect, const Rect *viewRect)
  655. ;
  656.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  657.         _TEStyleNew:    OPWORD    $A83E
  658.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  659.         IMPORT_CFM_FUNCTION TEStyleNew
  660.     ENDIF
  661.  
  662. ;
  663. ; pascal void TESetStyleHandle(TEStyleHandle theHandle, TEHandle hTE)
  664. ;
  665.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  666.         Macro
  667.         _TESetStyleHandle
  668.             move.w              #$0005,-(sp)
  669.             dc.w                $A83D
  670.         EndM
  671.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  672.         IMPORT_CFM_FUNCTION TESetStyleHandle
  673.     ENDIF
  674.  
  675. ;
  676. ; pascal TEStyleHandle TEGetStyleHandle(TEHandle hTE)
  677. ;
  678.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  679.         Macro
  680.         _TEGetStyleHandle
  681.             move.w              #$0004,-(sp)
  682.             dc.w                $A83D
  683.         EndM
  684.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  685.         IMPORT_CFM_FUNCTION TEGetStyleHandle
  686.     ENDIF
  687.  
  688. ;
  689. ; pascal void TEGetStyle(short offset, TextStyle *theStyle, short *lineHeight, short *fontAscent, TEHandle hTE)
  690. ;
  691.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  692.         Macro
  693.         _TEGetStyle
  694.             move.w              #$0003,-(sp)
  695.             dc.w                $A83D
  696.         EndM
  697.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  698.         IMPORT_CFM_FUNCTION TEGetStyle
  699.     ENDIF
  700.  
  701. ;
  702. ; pascal void TEStylePaste(TEHandle hTE)
  703. ;
  704.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  705.         Macro
  706.         _TEStylePaste
  707.             move.w              #$0000,-(sp)
  708.             dc.w                $A83D
  709.         EndM
  710.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  711.         IMPORT_CFM_FUNCTION TEStylePaste
  712.     ENDIF
  713.  
  714. ;
  715. ; pascal void TESetStyle(short mode, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  716. ;
  717.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  718.         Macro
  719.         _TESetStyle
  720.             move.w              #$0001,-(sp)
  721.             dc.w                $A83D
  722.         EndM
  723.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  724.         IMPORT_CFM_FUNCTION TESetStyle
  725.     ENDIF
  726.  
  727. ;
  728. ; pascal void TEReplaceStyle(short mode, const TextStyle *oldStyle, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  729. ;
  730.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  731.         Macro
  732.         _TEReplaceStyle
  733.             move.w              #$0002,-(sp)
  734.             dc.w                $A83D
  735.         EndM
  736.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  737.         IMPORT_CFM_FUNCTION TEReplaceStyle
  738.     ENDIF
  739.  
  740. ;
  741. ; pascal StScrpHandle TEGetStyleScrapHandle(TEHandle hTE)
  742. ;
  743.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  744.         Macro
  745.         _TEGetStyleScrapHandle
  746.             move.w              #$0006,-(sp)
  747.             dc.w                $A83D
  748.         EndM
  749.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  750.         IMPORT_CFM_FUNCTION TEGetStyleScrapHandle
  751.     ENDIF
  752.  
  753. ;
  754. ; pascal void TEStyleInsert(const void *text, long length, StScrpHandle hST, TEHandle hTE)
  755. ;
  756.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  757.         Macro
  758.         _TEStyleInsert
  759.             move.w              #$0007,-(sp)
  760.             dc.w                $A83D
  761.         EndM
  762.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  763.         IMPORT_CFM_FUNCTION TEStyleInsert
  764.     ENDIF
  765.  
  766. ;
  767. ; pascal long TEGetHeight(long endLine, long startLine, TEHandle hTE)
  768. ;
  769.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  770.         Macro
  771.         _TEGetHeight
  772.             move.w              #$0009,-(sp)
  773.             dc.w                $A83D
  774.         EndM
  775.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  776.         IMPORT_CFM_FUNCTION TEGetHeight
  777.     ENDIF
  778.  
  779. ;
  780. ; pascal Boolean TEContinuousStyle(short *mode, TextStyle *aStyle, TEHandle hTE)
  781. ;
  782.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  783.         Macro
  784.         _TEContinuousStyle
  785.             move.w              #$000A,-(sp)
  786.             dc.w                $A83D
  787.         EndM
  788.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  789.         IMPORT_CFM_FUNCTION TEContinuousStyle
  790.     ENDIF
  791.  
  792. ;
  793. ; pascal void TEUseStyleScrap(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw, TEHandle hTE)
  794. ;
  795.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  796.         Macro
  797.         _TEUseStyleScrap
  798.             move.w              #$000B,-(sp)
  799.             dc.w                $A83D
  800.         EndM
  801.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  802.         IMPORT_CFM_FUNCTION TEUseStyleScrap
  803.     ENDIF
  804.  
  805. ;
  806. ; pascal void TECustomHook(TEIntHook which, UniversalProcPtr *addr, TEHandle hTE)
  807. ;
  808.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  809.         Macro
  810.         _TECustomHook
  811.             move.w              #$000C,-(sp)
  812.             dc.w                $A83D
  813.         EndM
  814.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  815.         IMPORT_CFM_FUNCTION TECustomHook
  816.     ENDIF
  817.  
  818. ;
  819. ; pascal long TENumStyles(long rangeStart, long rangeEnd, TEHandle hTE)
  820. ;
  821.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  822.         Macro
  823.         _TENumStyles
  824.             move.w              #$000D,-(sp)
  825.             dc.w                $A83D
  826.         EndM
  827.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  828.         IMPORT_CFM_FUNCTION TENumStyles
  829.     ENDIF
  830.  
  831. ;
  832. ; pascal short TEFeatureFlag(short feature, short action, TEHandle hTE)
  833. ;
  834.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  835.         Macro
  836.         _TEFeatureFlag
  837.             move.w              #$000E,-(sp)
  838.             dc.w                $A83D
  839.         EndM
  840.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  841.         IMPORT_CFM_FUNCTION TEFeatureFlag
  842.     ENDIF
  843.  
  844. ;
  845. ; pascal OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE)
  846. ;
  847.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  848.         Macro
  849.         _TEGetHiliteRgn
  850.             move.w              #$000F,-(sp)
  851.             dc.w                $A83D
  852.         EndM
  853.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  854.         IMPORT_CFM_FUNCTION TEGetHiliteRgn
  855.     ENDIF
  856.  
  857. ;
  858. ; pascal void TESetScrapLength(long length)
  859. ;
  860.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  861.         IMPORT_CFM_FUNCTION TESetScrapLength
  862.     ENDIF
  863.  
  864. ;
  865. ; pascal OSErr TEFromScrap(void )
  866. ;
  867.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  868.         IMPORT_CFM_FUNCTION TEFromScrap
  869.     ENDIF
  870.  
  871. ;
  872. ; pascal OSErr TEToScrap(void )
  873. ;
  874.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  875.         IMPORT_CFM_FUNCTION TEToScrap
  876.     ENDIF
  877.  
  878. ;
  879. ; pascal void TESetClickLoop(TEClickLoopUPP clikProc, TEHandle hTE)
  880. ;
  881.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  882.         IMPORT_CFM_FUNCTION TESetClickLoop
  883.     ENDIF
  884.  
  885. ;
  886. ; pascal void TESetWordBreak(WordBreakUPP wBrkProc, TEHandle hTE)
  887. ;
  888.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  889.         IMPORT_CFM_FUNCTION TESetWordBreak
  890.     ENDIF
  891.  
  892.  
  893.     IF OLDROUTINENAMES THEN
  894.     ENDIF    ; OLDROUTINENAMES
  895.     ENDIF ; __TEXTEDIT__ 
  896.  
  897.